package com.monitor.display_platform.core.exception;

import com.monitor.display_platform.core.common.ResponseCode;

public class ParameterException extends BaseException {
    private ParameterException(int status, String msg) {
        super(status, msg);
    }
    public static ParameterException _404(String msg){
        return new ParameterException(ResponseCode.NOT_FOUND.getCode(),msg);
    }
    /**已经注册*/
    public static ParameterException isExist(String msg){
        return _404(msg + "已经注册");
    }
    /**用户名或密码错误*/
    public static ParameterException errorNameOrPass(){
        return _404("用户名或密码错误");
    }
    /**用户名格式错误*/
    public static ParameterException errorAccountParttern(){
        return _404("用户名格式错误");
    }
    /**密码错误*/
    public static ParameterException errorPassword(){
        return _404("密码错误");
    }
}
